Getting the incident states

To retrieve the incident states of the incidents modified within a specific time period.

GET

https://Logpoint-IP/incident_states

Parameter

Value Type

Description

username

String

A Logpoint username

secret_key

String

Secret key of Logpoint. Refer to Finding the Access Key.

requestData

JSON Object

A JSON objects containing the following parameters:

ts_from: Start timestamp value.

ts_to: End timestamp value.

Parameters

The parameters should be included in the request body as raw text.

{
        "username": "John",
        "secret_key": "a1b2c3d4e5f6g7h8i9j0k1",
        "requestData": {
                "version": "0.1",
                "ts_from": 1633085529,
                "ts_to": 1640595047
                }
        }

Note

Content-Type, Content-Length, and Host must be passed in the request header. Content-Type should be application/json.

Request Example

../_images/LP_API_Incident_State_Sample.png

Incident State Request using Postman.

cURL Code

curl --location --request GET 'https://10.45.10.172/incident_states' \
--header 'Content-Type: application/json' \
--data '{
    "username": "John",
    "secret_key": "a1b2c3d4e5f6g7h8i9j0k1",
    "requestData": {
        "version": "0.1",
        "ts_from": 1633085529,
        "ts_to": 1683624378
    }
}'

Sample JSON response

{
        "success": true,
        "incidents": [state1, state2, …, stateN]
}

Sample state

        {
    "id": "61c97d96f2adef60601f5a66",
    "name": "test",
    "assigned_to": "5bebd9fdd8aaa42840edc853",
    "status": "resolved",
    "comments": [
        {
            "title": "admin",
            "comment": "Resolved",
            "time": 1640594922
        },
        {
            "title": "admin",
            "comment": "Verified and Necessary Action applied",
            "time": 1640594947
        },
        {
            "title": "admin",
            "comment": "Completed",
            "time": 1640595047
        }
    ]
}

Helpful?

We are glad this guide helped.


Please don't include any personal information in your comment

Contact Support